import java.util.Arrays;


public class E6 {

  /**
   * @param args
   */
  public static void main(String[] args) {
	  String[] words = {"Java","programming","cource"};
	  String input = "";
	  for (String word : words) {
		input = input.replaceAll("(?i)" + word, replacement(word));
	}
  }

  static String replacement(String word) {
	  char[] chars =  new  char[word.length()];
	  Arrays.fill(chars, '*');
	  return new String(chars);
  }
}
